<nav class="navbar navbar-expand-lg navbar-dark bg-dark">   
    <div class="container ">     
        <a class="navbar-brand" href="{{route('name')}}">Weibo App</a>     
        <div class="btn-group">
            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              Action <span class="caret"></span>
            </button>
            <ul class="dropdown-menu">
              <li><a href="#">Action</a></li>
              <li><a href="#">Another action</a></li>
              <li><a href="#">Something else here</a></li>
              <li role="separator" class="divider"></li>
              <li><a href="#">Separated link</a></li>
            </ul>
          </div>
        <ul class="navbar-nav justify-content-end">       
            @if (Auth::check())
            <li class="nav-item"><a class="nav-link" href="#">用户列表</a></li>
            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                    {{ Auth::user()->name }}
                </a>
                <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                    <a class="dropdown-item" href="{{ route('users.show', Auth::user()) }}">个人中心</a>
                    <a class="dropdown-item" href="#">编辑资料</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" id="logout" href="#">
                    <form action="{{ route('logout') }}" method="POST">
                    {{ csrf_field() }}
                    {{ method_field('DELETE') }}
                    <button class="btn btn-block btn-danger" type="submit" name="button">退出</button>
                    </form>
                    </a>
                </div>
            </li>
                    @else
            <li class="nav-item"><a class="nav-link" href="{{route('help')}}">帮助</a></li>       
            <li class="nav-item" ><a class="nav-link" href="#">登录</a></li>     
            @endif
        </ul>   
    </div> 
</nav>
